import request from '@/utils/request'
export function Edetails(liaUserName) {
  return request({
    url: '/operate/app/get_yzg_detail?username=' + liaUserName,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    method: 'get'
  })
}
export function llydetails(liaUserName) {
  return request({
    url: '/operate/app/get_lly_detail?username=' + liaUserName,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    method: 'get'
  })
}
export function EdetailsList(liaUserName) {
  return request({
    url: '/operate/app/list_yzg_detail?username=' + liaUserName,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    method: 'get'
  })
}
export function llydetailsList(liaUserName) {
  return request({
    url: '/operate/app/list_lly_detail?username=' + liaUserName,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    method: 'get'
  })
}
export function delLly(liaUserName) {
  return request({
    url: '/operate/app/lly_unbound?username=' + liaUserName,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    method: 'get'
  })
}
export function untyingLia(delliaName) {
  return request({
    url: '/operate/app/lly_unbound?username=' + delliaName,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    method: 'get'
  })
}

export function llyList(params) {
  return request({
    url: '/operate/app/lly_by_list',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    method: 'get',
    data: params,
    params: {
      start: params.start,
      length: params.length,
      pageConvert: params.pageConvert,
      county: params.county,
      username: params.username,
      nickname: params.nickname
    }
  })
}

export function yzgRelCount(yzgname) {
  return request({
    url: '/operate/app/yzgRelCount?username=' + yzgname,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    method: 'get'
  })
}
export function addLly(params) {
  return request({
    url: '/operate/app/lly_bound_by_name2',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    method: 'post',
    data: params
  })
}

export function updateLiaison(data) {
  return request({
    url: '/operate/app',
    method: 'put',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    data
  })
}
export function createLiaison(data) {
  return request({
    url: '/operate/app/yzg_save',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    method: 'post',
    data
  })
}
export function createXzxl(data) {
  return request({
    url: '/operate/app/xzxl_save',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    method: 'post',
    data
  })
}
